﻿using Hotel.BLL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Hotel.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class AdminsController : ControllerBase
    {
        private readonly AdminBLL db;

        public AdminsController(AdminBLL db)
        {
            this.db = db;
        }
        [HttpGet]
        public IActionResult Login(string UserNmae, string UsetPwd)
        {
            try
            {
                var res = db.Login(UserNmae, UsetPwd);
                return Ok(res);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
